home *** CD-ROM | disk | FTP | other *** search
- /*
- File: BndNSUtl.h
-
- Contains: Binding utilities for EditorSetup.
-
- Owned by: Reggie Adkins
-
- Copyright: © 1993 - 1996 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <7> 7/16/96 RA Compile stand alone
- <6> 6/27/96 TJ Added GetgBinding to enable others to get
- the binding session instead of using the
- global.
- <5> 6/24/96 RA T10025: Adjustments for CORBA compliant
- API.
- <4> 6/23/96 TJ Included ODSessn.xh
- <3> 6/21/96 RA T10025: Deprecated most utils for
- implementors, obsoleted most for parts
- <2> 5/23/96 RA 1330687: BndNSUtl should use
- platformFile->read instead of FSRead
-
- To Do:
- */
-
- #ifndef _BNDNSUTL_
- #define _BNDNSUTL_
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #ifndef _PLFMFILE_
- #include "PLFMFile.h"
- #endif
-
- //==============================================================================
- // Classes used by this interface
- //==============================================================================
- class ODTypeList;
- class EditorSet;
- class ODNameSpaceManager;
- class ODStorageUnitView;
- class ODPart;
- class ODSession;
- class ODBinding;
-
- //==============================================================================
- // functions
- //==============================================================================
- extern "C" {
-
- void InitBindingNamespaceUtils(ODSession* session);
- // New in OD 1.1, you must call this before calling any of the routines
- // below that take an ODNameSpaceManager* as a param.
- // These routines have been reimplemented as methods on the ODBinding object.
- // The routines below are deprecated in OD 1.1. Their new implementation will
- // work but you should really be calling the new ODBinding API's directly.
- // If you want to use these depricated routines to afford a degree of source
- // compatibility, you must add a call to InitBindingNamespaceUtils before
- // making any calls to these utils.
-
- ODBinding* GetgBinding();
-
- #ifdef _OD_IMPL_
-
- ODEditor SetSysPrefEditorForKind(ODNameSpaceManager* theNameSpaceManager,
- ODType kind, ODEditor editor);
- // Sets the system-wide preferred editor for the argument data kind.
- // This routine will overwrite any preference set by the user.
-
- ODEditor SetSysPrefEditorForCategory(ODNameSpaceManager* theNameSpaceManager,
- ODType category,ODEditor editor);
- // Sets the system-wide preferred editor for the argument data category.
- // This routine will overwrite any preference set by the user.
-
- ODEditor GetSysPrefEditorForKind(ODNameSpaceManager* theNameSpaceManager,
- ODType kind);
- // Returns the system-wide preferred editor for the argument data kind.
- // A null value is returned if no preference has been specified.
- // This routine checks to ensure that the preferred editor actually exists;
- // if it does not, the preference is canceled and null is returned.
-
- ODEditor GetSysPrefEditorForCategory(ODNameSpaceManager* theNameSpaceManager,
- ODType category);
- // Returns the system-wide preferred editor for the argument data category.
- // A null value is returned if no preference has been specified.
-
- ODTypeList* GetCategoriesOfKind(ODNameSpaceManager* theNameSpaceManager,
- ODType kind);
- // Returns the categories of the argument data kind, in the content of the
- // argument storage unit. The client must dispose of the result.
-
- #endif
-
- ODBoolean GetUserKindFromKind( ODNameSpaceManager* theNameSpaceManager,
- ODType kind, ODName** name );
- ODBoolean GetUserEditorFromEditor( ODNameSpaceManager* theNameSpaceManager,
- ODType editor, ODName** name );
- ODBoolean GetUserCatFromCat( ODNameSpaceManager* theNameSpaceManager,
- ODType category, ODName** name );
-
- #ifdef _OD_IMPL_
-
- ODOSType ODGetODOSTypeForKind(ODNameSpaceManager* theNmSpcMgr, ODType kind);
-
- ODBoolean EditorSupportsKind( ODNameSpaceManager* theNameSpaceManager,
- ODEditor editor, ODType kind );
- // Returns true if the argument editor supports the argument data type
- // without translation.
-
- ODBoolean GetAllEditorsForCategory( ODNameSpaceManager* theNameSpaceManager,
- ODType category, EditorSet* theEditorSet );
- // Returns the set of Editors supporting the argument data category without translation.
-
- ODBoolean GetAllEditorsForKind(ODNameSpaceManager* theNameSpaceManager,
- ODType kind, EditorSet* theEditorSet);
- // Returns the set of Editors supporting the argument data kind without translation.
-
- void GetAllKindsForEditor(ODNameSpaceManager* theNmSpcMgr,
- ODTypeList* kindList, ODEditor editorID);
-
- ODULong ReadSize(PlatformFile* file, ODStorageUnitView* view);
-
- void ReadBytes(PlatformFile* file, ODStorageUnitView* view,
- ODPtr bytes, ODULong* length);
-
- #endif
-
- EditorSet* ODGetEditorSetFromResFile(ODSShort resRefNum);
-
- // Returns the set of Editors IDs (if any) found in this file
-
- EditorSet* ODGetEditorSetFromNMAP(ODHandle nmap );
-
- } // End of extern "C" {
-
- #endif // _BNDNSUTL_
-